<?php
/**
 *
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.Console.Templates.default.views
 * @since         CakePHP(tm) v 1.2.0.5234
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */
?>
<?php
echo "<?php
\$this->Html->addCrumb('Home', '/admin');
\$this->Html->addCrumb('Lista " . Inflector::humanize($pluralVar) . "', array('action' => 'index'));
?>";
echo "<?php echo \$this->Paginator->pagination(); ?>";
?>

<table class="table table-condensed table-hover table-bordered">
    <thead>
        <tr>
            <?php foreach ($fields as $field): ?>
                <th><?php echo "<?php echo \$this->Paginator->sort('{$field}',__('" . Inflector::camelize(Inflector::pluralize($field)) . "')); ?>"; ?></th>
            <?php endforeach; ?>
            <th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th>
        </tr>
    </thead>
    <tbody>
        <?php
        echo "<?php foreach (\${$pluralVar} as \${$singularVar}){ ?>\n";
        echo "\t<tr>\n";
        foreach ($fields as $field) {
            echo "\t\t<td><?php echo h(\${$singularVar}['{$modelClass}']['{$field}']); ?>&nbsp;</td>\n";
        }

        echo "\t\t<td class=\"actions\">\n";
        echo "\t\t\t<?php echo \$this->Html->link(__('View'), array('action' => 'view', \${$singularVar}['{$modelClass}']['{$primaryKey}']), array('class' => 'btn btn-xs btn-info', 'icon' => 'fa fa-search')); ?>\n";
        echo "\t\t\t<?php echo \$this->Html->link(__('Edit'), array('action' => 'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}']), array('class' => 'btn btn-xs btn-warning', 'icon' => 'fa fa-pencil')); ?>\n";
        echo "\t\t\t<?php echo \$this->Form->postLink(__('Delete'), array('action' => 'delete', \${$singularVar}['{$modelClass}']['{$primaryKey}']), array('class' => 'btn btn-xs btn-danger', 'icon' => 'fa fa-trash-o'), __('Are you sure you want to delete # %s?', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
        echo "\t\t</td>\n";
        echo "\t</tr>\n";

        echo "<?php } ?>\n";
        ?>
    </tbody>
</table>
<?php echo "<?php echo \$this->Paginator->pagination(); ?>"; ?>